package com.wuyou.hard;

import java.io.File;
import java.sql.ClientInfoStatus;
import java.util.Arrays;
import java.util.Comparator;

/**
 * 面试题 17.19. 消失的两个数字
 */
public class MissingTwo {


    public static void main(String[] args) {
        MissingTwo missingTwo = new MissingTwo();
        int[] nums = {58, 4660, 8890, 8292, 4324, 6978, 6833, 7256, 9136, 2658, 1456, 3706, 2432, 3368, 346, 733, 4378, 5136, 6194, 2550, 5281, 7699, 2675, 1659, 6836, 5989, 1137, 1886, 2265, 5830, 6646, 5617, 7287, 1370, 9407, 3006, 7998, 658, 728, 9487, 6546, 286, 2838, 6870, 293, 8752, 6893, 9222, 6153, 9028, 6211, 5680, 9653, 7210, 9531, 2929, 3103, 7626, 8935, 1807, 9821, 7468, 4330, 4495, 5690, 7686, 34, 9308, 7505, 4670, 6539, 1340, 5192, 6037, 7276, 8419, 6544, 5604, 997, 7528, 9809, 1671, 1105, 1898, 6115, 96, 5325, 5064, 1252, 9542, 9250, 3004, 6930, 5956, 4957, 4791, 9102, 4198, 6526, 5674, 6129, 5033, 7701, 8767, 9009, 5905, 8076, 6845, 6686, 9538, 7673, 7759, 6889, 4841, 3526, 6249, 3188, 3313, 1155, 4106, 4259, 4832, 946, 7011, 8197, 2601, 6811, 9404, 1651, 178, 2584, 5498, 493, 8626, 8486, 2304, 2741, 3008, 1525, 9090, 7349, 287, 3737, 2745, 5627, 7000, 1441, 5296, 8469, 5685, 3341, 802, 7282, 8891, 8991, 6840, 76, 9491, 1793, 7537, 6118, 5420, 1338, 1013, 5042, 9232, 7522, 5032, 972, 5834, 9577, 4258, 3626, 8679, 1553, 865, 4160, 9505, 7932, 3473, 4821, 1037, 6490, 8091, 3698, 7312, 2117, 7745, 7407, 123, 4412, 9280, 6188, 376, 1235, 6596, 3277, 4084, 1903, 3739, 6808, 8834, 3676, 9327, 1429, 8904, 3641, 1125, 38, 3741, 4362, 8136, 6440, 1093, 6617, 3538, 53, 4656, 3990, 5691, 2524, 3509, 7703, 5642, 5945, 7683, 7953, 174, 7674, 7795, 1622, 4366, 751, 6060, 1740, 5810, 7755, 6053, 9807, 5854, 2973, 9573, 2825, 2449, 9549, 5347, 3685, 9310, 2974, 9696, 5139, 4563, 7465, 3764, 161, 951, 2386, 5487, 503, 9969, 4936, 3682, 9134, 6890, 2848, 2260, 7401, 5094, 2233, 6947, 4046, 6871, 4131, 4438, 5638, 3005, 911, 7882, 8977, 5569, 8208, 8885, 8573, 3532, 686, 6487, 5519, 4152, 396, 1680, 9540, 6321, 6735, 3440, 3460, 5026, 3327, 4098, 8411, 2997, 9874, 2013, 7343, 9230, 5048, 5896, 545, 2005, 8892, 6114, 7693, 7589, 7058, 9839, 4206, 8754, 8029, 7531, 7405, 1264, 3667, 8750, 2196, 961, 9307, 6680, 9077, 5631, 1159, 2571, 4090, 9959, 1010, 7201, 6730, 3250, 2252, 2087, 8121, 5506, 8399, 1218, 2583, 5996, 2863, 6269, 133, 671, 7851, 4545, 5126, 3816, 4590, 8420, 1063, 5497, 3862, 538, 1949, 683, 1632, 1059, 6319, 4279, 7502, 3832, 1103, 5198, 3291, 8214, 1337, 2071, 8361, 9303, 2055, 1804, 1207, 6353, 6862, 5614, 578, 2834, 9524, 3244, 5071, 718, 1514, 618, 6897, 5300, 9605, 6531, 2418, 6160, 9098, 6423, 48, 6595, 2710, 1199, 3105, 4462, 5739, 5044, 9200, 1332, 7569, 8412, 7177, 1721, 6838, 3610, 6814, 2596, 7560, 7288, 4151, 344, 8326, 2396, 2122, 7086, 92, 9478, 3269, 8368, 7486, 5113, 9522, 9818, 9185, 2382, 8035, 8748, 5915, 8637, 8819, 2624, 7047, 4924, 1299, 5034, 1145, 6858, 1044, 1896, 8260, 3942, 6039, 2552, 4319, 3534, 1991, 7586, 8762, 4820, 4109, 9703, 1090, 5708, 7704, 9287, 8299, 2691, 4443, 6693, 1189, 8364, 4965, 6806, 7497, 9479, 1736, 5897, 4115, 2876, 6749, 351, 4389, 4904, 7152, 7495, 6471, 2257, 3115, 398, 2760, 2134, 4575, 598, 3624, 4637, 9624, 783, 3589, 7603, 9740, 1355, 6442, 2096, 1232, 228, 8165, 9306, 7332, 4721, 4811, 4404, 6135, 7783, 9328, 7080, 550, 4870, 6568, 7372, 3144, 2242, 5894, 2952, 8721, 8348, 1382, 5321, 7060, 3999, 2385, 8869, 5934, 2455, 9364, 2086, 4530, 4001, 6254, 3841, 7926, 1225, 6995, 8942, 4589, 8296, 2565, 1694, 5287, 4189, 8588, 2895, 8373, 5394, 2866, 7351, 124, 8822, 4060, 6874, 6140, 8295, 7536, 9467, 9416, 427, 9520, 3495, 1824, 2945, 6176, 6414, 151, 7099, 8257, 3371, 7974, 428, 8428, 243, 1434, 7031, 9722, 753, 9755, 3067, 879, 9022, 4029, 8770, 7939, 110, 7293, 7035, 7661, 7234, 8317, 3552, 5849, 6473, 9400, 4679, 9525, 2888, 6144, 630, 5513, 1021, 485, 3243, 3574, 1971, 3922, 7702, 8955, 5786, 9699, 1816, 8559, 8445, 197, 2656, 6921, 6640, 632, 3801, 2253, 5868, 9552, 9471, 6868, 403, 2641, 3799, 5339, 7760, 8395, 3417, 579, 9027, 5815, 5611, 6994, 295, 1519, 7289, 8781, 8051, 4792, 9096, 7139, 5182, 3868, 8520, 9398, 8755, 4472, 1217, 4424, 4204, 8011, 9415, 332, 1776, 2984, 261, 5004, 8371, 9737, 6320, 2988, 122, 4588, 9036, 7226, 1644, 3211, 8771, 7643, 6217, 4119, 7990, 899, 5675, 5477, 9943, 436, 2727, 5093, 6277, 7113, 1371, 4026, 1928, 8392, 1061, 6672, 4449, 9661, 6738, 345, 1654, 1165, 4532, 780, 3649, 812, 7460, 8139, 9644, 1123, 833, 1668, 5484, 5760, 4082, 4517, 4901, 1811, 7073, 3450, 185, 8986, 433, 3073, 3268, 2388, 7341, 8212, 7294, 9745, 6336, 1451, 5784, 8806, 7143, 4853, 6179, 5341, 7561, 2551, 5635, 1322, 7928, 4432, 146, 2744, 408, 7135, 2469, 8668, 7164, 908, 596, 9178, 803, 4942, 5516, 7439, 5323, 331, 9248, 3402, 5913, 9655, 4806, 2474, 1583, 7478, 7663, 5647, 779, 3493, 5425, 712, 2077, 6785, 6045, 1398, 6073, 2685, 5735, 8695, 5540, 3553, 6124, 8899, 4732, 6308, 3821, 7858, 2787, 2747, 8306, 1043, 340, 1730, 8173, 1231, 9530, 2479, 9930, 1653, 4010, 5615, 8871, 6006, 5285, 5856, 8922, 2871, 7705, 8309, 4246, 7966, 6444, 4486, 4572, 7576, 6774, 9611, 8926, 478, 2674, 4393, 1892, 766, 8784, 1894, 3456, 7638, 1511, 4141, 5302, 3309, 8838, 1488, 2361, 2442, 7317, 4384, 2706, 1789, 1100, 4494, 7573, 1845, 4132, 6461, 7350, 6107, 1877, 7993, 63, 7769, 7685, 1762, 9494, 4968, 9130, 8843, 8338, 367, 6250, 9394, 5066, 5508, 608, 8265, 1133, 9341, 8493, 9787, 9986, 8235, 3020, 4717, 9367, 7396, 5104, 7557, 6505, 2383, 1444, 4884, 1394, 7964, 4329, 1618, 990, 8503, 9960, 1595, 5446, 9448, 9120, 743, 3023, 1056, 1636, 2314, 9441, 6562, 2017, 2465, 2105, 2538, 8111, 3713, 9939, 5622, 9956, 2898, 1827, 6501, 3422, 5710, 9492, 5433, 1775, 765, 7507, 5499, 2209, 9543, 8837, 8416, 1466, 288, 1290, 10000, 6048, 2059, 4686, 8455, 6841, 7270, 1759, 6865, 6419, 2778, 5528, 6543, 2380, 2205, 9893, 2591, 4927, 7138, 3852, 3091, 5903, 8404, 1003, 3466, 869, 1216, 1134, 4261, 8634, 7094, 5510, 3037, 7037, 4364, 8245, 4698, 4798, 5172, 9275, 5068, 5111, 3738, 701, 2042, 5825, 921, 9979, 9513, 2431, 1012, 4284, 5160, 5183, 5031, 3842, 7121, 9144, 4260, 3018, 8457, 8815, 8331, 5997, 7565, 6712, 3465, 1760, 2940, 8407, 9253, 566, 406, 6940, 1234, 4193, 1193, 4030, 8643, 4818, 1144, 4801, 9161, 9304, 7631, 2574, 1335, 9157, 7751, 7042, 9498, 9334, 8591, 1507, 9773, 2317, 9089, 4514, 1277, 9890, 379, 8000, 2679, 6902, 4607, 4865, 638, 7747, 3859, 3320, 6710, 8833, 4551, 6810, 4518, 3090, 1565, 3588, 4662, 7831, 6937, 9880, 811, 624, 4638, 6097, 3125, 9006, 793, 4963, 1126, 6524, 5014, 1542, 2739, 8037, 7327, 2721, 2298, 8690, 5354, 8927, 2533, 4653, 5342, 4941, 2468, 3742, 325, 6945, 7838, 3145, 2250, 4996, 3359, 8490, 3795, 5215, 2963, 4677, 6849, 8015, 2480, 8603, 4373, 692, 1621, 3126, 2261, 1626, 9958, 118, 3937, 5811, 1717, 5700, 5754, 9159, 1610, 5920, 3926, 1048, 7061, 881, 1947, 2341, 8217, 8203, 1083, 3715, 6375, 6764, 6967, 1060, 9414, 4685, 1329, 1574, 1795, 7714, 1742, 8112, 4819, 79, 4049, 4560, 1068, 2133, 5017, 9385, 902, 1692, 1821, 285, 3097, 9734, 617, 5411, 7814, 2690, 4114, 2693, 389, 5350, 9627, 6354, 6989, 1923, 1835, 9186, 8700, 8820, 1002, 9177, 3766, 5816, 3134, 141, 2935, 606, 8656, 3631, 1722, 6695, 2611, 4251, 5902, 1748, 6031, 9770, 2507, 7385, 6065, 8789, 6514, 6401, 6896, 3139, 1638, 809, 9792, 6517, 6066, 6973, 5640, 1897, 2140, 9725, 2763, 2404, 750, 2796, 6815, 5451, 4006, 8385, 3679, 5426, 9560, 5957, 4553, 613, 5345, 8466, 6156, 8803, 3619, 7383, 2489, 3894, 7451, 7630, 9190, 3481, 4830, 7331, 9551, 2608, 3875, 8596, 9940, 2753, 2629, 1201, 9207, 3671, 4267, 5771, 7742, 9803, 3427, 1640, 5949, 1746, 4504, 3722, 837, 3366, 9493, 6503, 5250, 5987, 4868, 7130, 2890, 4398, 5174, 9833, 5020, 7540, 7044, 537, 6013, 2411, 2835, 9619, 5030, 2521, 1212, 9245, 4068, 6119, 1331, 9233, 9468, 3335, 2784, 6332, 8861, 3861, 9425, 6542, 3081, 9512, 4308, 2163, 2204, 7520, 2743, 5453, 5482, 497, 2654, 9557, 257, 5021, 8190, 7608, 572, 7200, 302, 556, 6030, 1321, 7251, 5564, 5751, 3576, 8585, 8133, 8601, 1631, 3403, 5258, 6467, 8305, 7749, 2494, 3754, 3786, 2862, 8757, 3350, 2124, 9180, 7089, 3444, 4720, 2665, 9475, 3731, 4176, 6271, 3242, 9937, 8587, 1410, 2152, 2343, 6963, 4144, 4663, 1070, 944, 7100, 6028, 8510, 5073, 7012, 8014, 380, 3643, 7423, 4529, 2686, 6976, 6584, 5459, 1379, 8380, 461, 9579, 3711, 2190, 4506, 4020, 1774, 9831, 2121, 8218, 1117, 3295, 3638, 2491, 1303, 8693, 8696, 4931, 2815, 4300, 9454, 6944, 6847, 7904, 4411, 7482, 5106, 9457, 7299, 3162, 7249, 2097, 3314, 6737, 2908, 1495, 6311, 5557, 3035, 5698, 6361, 4750, 2043, 3834, 4919, 7911, 2224, 7438, 5492, 7946, 5521, 2296, 7161, 3808, 3011, 6998, 5007, 8310, 2587, 6212, 8233, 4181, 499, 5468, 3900, 4875, 4846, 5561, 5835, 619, 5798, 1053, 7869, 3378, 7233, 2852, 4889, 4120, 5428, 5141, 7746, 230, 8859, 57, 1562, 8860, 597, 6052, 922, 6002, 4858, 3596, 6629, 8103, 2794, 3578, 866, 1650, 7891, 7105, 1314, 6507, 713, 457, 3611, 9356, 711, 9259, 7645, 729, 7292, 1796, 8141, 2021, 5204, 5817, 9374, 6301, 7873, 9386, 2702, 2434, 7187, 5672, 4714, 1119, 2436, 7398, 2004, 4757, 4985, 7307, 9119, 8228, 3879, 1691, 5150, 3036, 7822, 3212, 9296, 7707, 1601, 2717, 7315, 8030, 8240, 6216, 4339, 5481, 3896, 5565, 2, 2770, 8653, 925, 8652, 2751, 1769, 949, 5125, 6034, 6566, 2495, 5636, 7179, 4420, 9020, 6483, 4342, 9187, 1020, 134, 7067, 6766, 7647, 6395, 281, 3920, 2284, 7186, 2998, 2407, 2897, 4087, 2276, 6258, 4618, 1953, 8200, 4754, 5655, 6220, 610, 1935, 64, 5578, 6519, 2543, 5649, 8335, 1904, 1961, 1756, 9216, 269, 3962, 7543, 6842, 3497, 1637, 629, 5430, 7627, 4298, 5697, 6017, 468, 5203, 5486, 3791, 3174, 7835, 7935, 6656, 6541, 9931, 5890, 3032, 2315, 9148, 5267, 5352, 7446, 7318, 1, 3172, 9650, 7984, 1014, 639, 4994, 223, 752, 4738, 6486, 9742, 5253, 9503, 4425, 4526, 9899, 2397, 2527, 4395, 5629, 850, 6305, 4035, 8402, 5968, 8287, 3932, 8181, 6130, 4693, 6717, 6689, 5163, 6651, 7724, 4386, 9515, 7654, 5379, 4672, 3262, 3235, 8741, 1958, 8934, 5251, 7077, 1015, 9523, 9583, 3887, 9978, 4867, 364, 2078, 4066, 9257, 1579, 9113, 3607, 7362, 7309, 9812, 89, 3531, 3407, 7175, 5657, 3505, 4969, 3299, 1985, 2914, 1900, 5848, 6318, 7604, 7646, 9832, 3054, 6392, 7664, 5724, 9273, 164, 8805, 5678, 2016, 6516, 8230, 1004, 9774, 4133, 4748, 7295, 8140, 91, 9465, 8071, 565, 2800, 7313, 9033, 7884, 4201, 4305, 6581, 3564, 165, 5695, 2408, 5718, 1598, 9658, 1543, 1478, 9862, 8038, 3543, 2280, 8166, 9035, 8731, 8759, 2882, 8930, 3034, 3298, 6877, 4773, 7072, 2498, 7649, 6914, 191, 3527, 8951, 9290, 943, 4478, 2375, 7300, 7991, 4525, 1674, 9738, 5884, 2573, 2053, 5772, 5948, 7057, 45, 5603, 214, 3570, 2119, 7045, 3508, 2264, 3029, 5770, 6446, 3358, 5881, 1834, 4317, 3860, 4110, 2532, 488, 9752, 5769, 9845, 7052, 5778, 3561, 3190, 6960, 9314, 1809, 3541, 319, 8954, 6236, 7903, 7271, 300, 8098, 5511, 9459, 948, 7283, 7298, 9788, 2032, 9635, 6644, 4282, 666, 3853, 646, 7921, 3518, 6007, 4121, 1978, 9387, 6370, 892, 4918, 9662, 7003, 755, 4355, 9806, 41, 604, 3674, 3482, 267, 4180, 1173, 4897, 4220, 3361, 3985, 109, 2829, 22, 3384, 8289, 6172, 6534, 280, 3824, 9105, 5282, 7575, 5308, 8034, 5846, 1666, 9675, 9587, 7632, 3663, 3229, 9884, 4444, 3051, 6611, 5758, 1996, 1132, 6950, 437, 6510, 8426, 8479, 7008, 5944, 3367, 9065, 9456, 4743, 5295, 3192, 2301, 7051, 6485, 9003, 2346, 5063, 3540, 8010, 9423, 2867, 4470, 9565, 4387, 4071, 7272, 3734, 7320, 5232, 2073, 77, 7112, 8961, 3823, 6038, 8616, 1635, 4519, 4381, 1906, 6455, 3479, 3488, 886, 4706, 8026, 1307, 4447, 8824, 8911, 2749, 335, 8077, 5541, 3940, 7404, 1840, 2999, 2451, 8041, 2221, 4479, 995, 9501, 8389, 1802, 5594, 6184, 3458, 4712, 7379, 8949, 7609, 3565, 9906, 7679, 1660, 5201, 6927, 6706, 6867, 5218, 2157, 311, 8236, 555, 1725, 6154, 310, 9935, 425, 4945, 8906, 9458, 8811, 3718, 1806, 2492, 8840, 1285, 8778, 3693, 7076, 7229, 4938, 9817, 1081, 2762, 8116, 2501, 2384, 6371, 3285, 7269, 8512, 168, 9606, 7585, 4668, 7665, 8943, 1433, 5796, 4636, 127, 1656, 1360, 2813, 8505, 1607, 4739, 7694, 2861, 641, 1160, 6824, 8841, 6773, 9763, 6275, 2430, 8432, 4216, 3724, 9760, 7826, 8796, 7267, 9315, 4562, 4011, 6171, 4597, 8504, 5138, 6920, 7480, 1364, 4426, 2420, 4760, 4694, 9183, 4789, 8932, 4937, 3818, 9685, 4241, 5799, 1309, 6648, 3068, 8765, 3515, 2626, 7346, 3157, 8013, 6602, 5362, 7203, 23, 9040, 329, 3551, 6769, 7118, 8063, 9607, 6671, 3705, 1453, 2008, 888, 2639, 1450, 9451, 7713, 5259, 3654, 2757, 6673, 5918, 4170, 1696, 8061, 4726, 8134, 6409, 3980, 1981, 7709, 7029, 5248, 1780, 3577, 8605, 9051, 7106, 4535, 8366, 5912, 4100, 7508, 9026, 818, 6439, 4992, 9358, 9087, 3240, 1107, 7257, 126, 9628, 6109, 7887, 1182, 2537, 8575, 3038, 7739, 4681, 9055, 3923, 9053, 2481, 7972, 409, 1380, 4334, 2332, 6776, 6378, 4274, 3254, 9489, 3476, 9038, 6655, 4021, 9632, 1966, 2968, 5142, 4335, 7049, 8342, 7894, 7004, 3410, 6778, 8283, 1920, 1517, 5571, 3451, 1582, 9790, 3664, 402, 9857, 1612, 8106, 6133, 3519, 7666, 9149, 3850, 1643, 3697, 8584, 1556, 592, 1116, 1521, 4265, 6330, 8867, 1647, 2502, 876, 6047, 4061, 3958, 8681, 4524, 5333, 859, 7678, 8216, 3833, 7101, 8316, 7776, 1734, 9162, 974, 9911, 2556, 795, 3777, 1977, 2108, 4584, 575, 8023, 180, 8644, 6637, 7844, 495, 2104, 7043, 9393, 4777, 3511, 4231, 3872, 8881, 5162, 419, 9336, 6873, 169, 199, 4980, 5179, 682, 8739, 9373, 5191, 9785, 2789, 2029, 5585, 5389, 5777, 5999, 196, 9766, 5483, 4199, 6193, 5327, 1150, 7580, 1176, 4684, 81, 9863, 5898, 2069, 258, 7116, 154, 2283, 6482, 6348, 1681, 1599, 158, 7016, 691, 8081, 360, 3996, 7416, 6460, 3927, 9980, 2549, 6880, 1752, 4210, 6000, 3177, 1548, 8618, 6106, 8358, 8973, 2567, 1279, 8728, 5858, 6477, 3618, 8717, 6986, 2116, 5387, 4270, 9411, 4502, 2207, 156, 361, 923, 5706, 362, 965, 5646, 2258, 6759, 8526, 392, 6589, 7860, 2066, 6451, 5228, 1911, 8005, 9553, 5954, 5824, 7155, 1089, 849, 6536, 125, 275, 6238, 3571, 7767, 7255, 8937, 5187, 2441, 5876, 4418, 4718, 4313, 7082, 7442, 3293, 448, 5311, 9043, 5364, 3434, 9397, 6744, 4863, 3094, 8782, 7696, 2553, 8154, 6929, 9923, 5398, 1784, 9169, 2775, 8987, 4235, 7856, 4492, 9546, 9270, 6948, 7373, 6357, 2669, 6912, 1567, 9384, 4745, 1943, 1968, 6325, 2389, 1430, 4976, 9886, 1633, 8161, 3247, 928, 6233, 7374, 4477, 9920, 762, 5928, 449, 1296, 3010, 7009, 3113, 2957, 3819, 7126, 6502, 1114, 3499, 5676, 9288, 4448, 4619, 3716, 371, 8369, 9659, 5429, 5812, 5662, 2358, 9034, 2393, 5432, 8446, 1266, 173, 4812, 7394, 924, 2360, 2536, 8830, 6609, 6556, 1724, 4333, 9968, 5998, 4561, 5500, 5584, 5313, 4211, 1140, 2267, 4363, 9462, 5168, 6201, 3484, 2977, 4939, 2272, 3431, 650, 5992, 9710, 5244, 3686, 7191, 7547, 4275, 2487, 6366, 526, 2448, 5931, 9380, 732, 6753, 5036, 7223, 7688, 2333, 3409, 5309, 4221, 6911, 1912, 4360, 6668, 7962, 6290, 116, 4243, 8914, 9390, 1655, 1812, 3344, 3246, 9708, 100, 602, 5074, 6719, 3141, 584, 2731, 839, 1336, 1111, 5298, 2956, 8913, 4631, 7726, 5410, 3905, 767, 8941, 8561, 5409, 113, 1428, 9698, 2172, 4634, 9337, 2041, 4959, 7071, 862, 3439, 5732, 8336, 414, 8773, 3670, 8083, 1085, 5065, 8621, 6905};
        //        System.out.println(missingTwo.solution_1(nums));
        long x = System.currentTimeMillis();
        missingTwo.shellSort(nums);
        System.out.println(System.currentTimeMillis() - x);
    }

    public int[] solution_1(int[] nums) {
        int[] res = new int[2];

        Arrays.sort(nums);
        int num = 1;
        int index = 0;
        int i = 0;
        while (index < res.length) {
            if (i < nums.length) {
                if (nums[i] != num) {
                    res[index] = num;
                    index++;
                    num++;
                    continue;
                }
            } else {
                res[index] = num;
                index++;
            }
            num++;
            i++;
        }
        return res;
    }

    // 希尔排序
    public void shellSort(int[] nums) {
        for (int step = nums.length / 2; step > 0; step /= 2) {
            for (int i = step; i < nums.length; i++) {
                int value = nums[i];
                int j;
                for (j = i - step; j >= 0 && nums[j] > value; j -= step) {
                    nums[j + step] = nums[j];
                }
                nums[j + step] = value;
            }
        }
    }
}
